<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>购物车 - VANCL 凡客诚品</title>
		<script type="text/javascript">
		var delCartUrl = "<?php echo U('Cart/del');?>";
		var incCartUrl = "<?php echo U('Cart/addNum');?>";
		var decCartUrl = "<?php echo U('Cart/decNum');?>";
		</script>
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/public.css"/>
		<script src="http://localhost/vshop/Template/default/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://localhost/vshop/Template/default/js/public.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/mycart.css"/>
		<script type="text/javascript" src="http://localhost/vshop/Template/default/js/mycart.js"></script>
	</head>

	<body>
		<div class="main">
			<div id="header">
				<a href="<?php echo U('Index/index');?>" class="logo"><img src="http://localhost/vshop/Template/default/images/vancl-logo.png" /></a>
				<div class="account">
					    <?php if(session('uname') && session('uid')){ ?>
						<p>
							您好，
							<span><?php echo $hd['session']['uname'];?></span>
							<a href="#">退出登录</a>
						</p>
					<?php }else{ ?>
						<p>您好，<span>欢迎光临凡客诚品！</span>&nbsp;
							<span>
								<a href="<?php echo U('User/login');?>">登陆</a>&nbsp;|&nbsp;<a href="<?php echo U('User/register');?>">注册</a>
							</span>
						</p>
					<?php } ?>
				</div>
			</div>
			<div id="location">
				<em>1.我的购物车</em>
				<span>2.填写核对信息单</span>
				<span>3.成功提交订单</span>
			</div>
			<div id="content">
				<div class="cartTop"><h2>我的购物车</h2></div>
				<div class="tip">
					<span>温馨提示：</span>
					1.选购清单中的商品无法保留库存，请您及时结算。2.商品的价格和库存将以订单提交时为准。3.促销活动满减优惠将均摊至商品小计中。
				</div>
				<div id="cartProduct">
					<div id="batchdelcart">
						<table cellspacing="0">
							<thead>
								<tr>
			                        <th class="title-white bd-left">&nbsp;</th>
			                        <th class="bar-title ">
			                            <input id="all-ckb-top" class="track all-products-ckb ckb" name="all-products" value="all-products" data-del-tip="" checked="checked" type="checkbox"><label for="all-ckb-top">全选</label>
			                        </th>
			                        <th class="image">&nbsp;</th>
			                        <th class="name">商品名称</th>
			                        <th class="size">规格</th>
			                        <th class="presentpoints" style="display:none">积分</th>
			                        <th class="price">单价</th>
			                        <th class="qty">数量</th>
			                        <th class="discount">优惠</th>
			                        <th class="subtotal">小计</th>
			                        <th class="operate ">操作</th>
			                        <th class="title-white bd-right">&nbsp;</th>
								</tr>
							</thead>
							<tbody id="vancl-general-product">
								<?php foreach ($cartData['goods'] as $k=>$v){?>
									<tr class="selected">
										<td class="white bd-left bd-bottom">&nbsp;</td>
								        <td class="bar bd-bottom" rowspan="1">
								            <input class="track ckb" name="p-item" data-del-tip="" value="" checked="checked" issupplier="False" shopid="10258" type="checkbox">
								        </td>
								        <td class="image bd-bottom" rowspan="1">
								            <a target="_blank" href="<?php echo U('Content/index',array('gid'=>$v['gid']));?>"><img alt="<?php echo $v['name'];?>" src="http://localhost/vshop/<?php echo $v['gpic'];?>"></a>
								        </td>
								        <td class="name bd-bottom">
								            <a target="_blank" href="<?php echo U('Content/index',array('gid'=>$v['gid']));?>" title="<?php echo $v['name'];?>"><?php echo $v['name'];?></a>
								        </td>
								        <td class="size bd-bottom"><?php echo $v['attrs'];?></td>
								        <td class="presentpoints bd-bottom" style="display:none">99分</td>
								        <td class="price bd-bottom">￥<?php echo $v['price'];?></td>
								        <td class="qty bd-bottom">
								            <form class="modify-qty" action="" method="get">
								                <a class="track decrease-disable" href="javascript:;">减少</a>
								                <input name="goodsnum" class="modify-product-qty goodsnum" value="<?php echo $v['num'];?>" type="text" />
								                <noscript><input type="submit" class="nojs-btn" value="修改" /></noscript>
								                <a class="increase track" href="javascript:;">增加</a>
									            <input name="sid" class="sid" value="<?php echo $k;?>" type="hidden" />
								            </form>
								        </td>
								        <td class="bd-bottom">-</td>
								        <td class="subtotal bd-bottom">￥<?php echo $v['total'];?></td>
								        <td class="operate bd-bottom">
								            <a class="del track" href="javascript:;" sid="<?php echo $k;?>">删除</a>
								        </td>
								        <td class="white bd-right bd-bottom">&nbsp;</td>
								    </tr>
							    <?php }?>
							</tbody>
							<tbody>
								<tr>
				                    <td class="white bd-left table-bottom table-bottom-td">&nbsp;</td>
				                    <td colspan="9" class="table-bottom table-bottom-td">&nbsp;</td>
				                    <td class="white bd-right table-bottom table-bottom-td">&nbsp;</td>
				                </tr>
							</tbody>
						</table>
						<div id="bar-summary" class="bar-summary clearfix" style="top: 0px;">
			                <div class="bar">
			                    <input id="all-ckb-bt" name="all-products" value="all-products" class="track all-products-ckb ckb" data-del-tip="" type="checkbox"><label for="all-ckb-bt">全选</label>
			                    <a href="javascript:;" class="batch-del-cart track" name="sp_cart_mycar_batch_clear">删除</a>
		                        <span>数量总计：<em><?php echo $cartData['total_rows'];?></em>件</span>
		                        <span><em>您目前可享受全场购物免运费</em></span>
			                </div>
			                <div class="summary">产品金额总计(不含运费)：<span class="amount">￥<em><?php echo $cartData['total'];?></em></span></div>
			                <div class="btn-panel">
			                     <a href="<?php echo U('Index/index');?>" class="go-buy track">&lt;&lt;继续购物</a>
			                     <a class="checkout track" href="<?php echo U('Order/add');?>" id="sp_cart_mycar_goPay">去结算&gt;&gt;</a>
			                </div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="copyRight">
			<div class="copyRightTab"><p>Copyright 2007 - 2014 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号</p></div>
		</div>
	</body>
</html>